<?php
	// Conexao
    $sql_connect = mysql_connect("localhost", "root", "tvcb") or die ("no DB Connection");
    mysql_select_db("gameon") or die ("DB not found");
	
	// Pega do unity
    $idLogin   = $_POST['idLogin'];
    $namechar  = $_POST['namechar'];
	
    mysql_query(("INSERT INTO personagem VALUES (NULL, '$idLogin', '$namechar', 0, 0, 0)")) or die(mysql_error());
	{
		if(mysql_affected_rows()== 1)
		{
			echo 1;
		} else 
		{
			echo 0;				
		}
		
	}
	
    mysql_close($sql_connect);
?>